#div2{
    width: 80px;
    height: 80px;
    background: red;
    position: absolute;
}
#div1{
    width: 400px;
    height: 400px;
    background:gray;
    position: relative;
}
.box {
    border: dashed 1px red;
    position: relative;
}